﻿using Easy.Cloud.Communication.Sms.Core;
using Easy.Cloud.Communication.Sms.Tencent;
using Easy.Cloud.Communication.Sms.Tencent.Options;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Linq;

namespace Easy.Cloud.Communication.Sms.Tencent
{
    public class TencentSmsOptionsExtension : ISmsOptionsExtension
    {
        private readonly TencentOptions  _tencentOptions;
        public TencentSmsOptionsExtension(TencentOptions option)
        {
            this._tencentOptions = option;
        }
        public void AddServices(IServiceCollection services)
        {
            services.AddSingleton(__ => _tencentOptions);

            services.AddScoped<ISmsClient, TencentSmsClient>();

            services.AddScoped<TencentSmsClient>();
        }
    }
}
